<?php

class GetData{
    
   public function GetListCourse(){
        $con = mysql_connect("localhost","phuongvu102","phuongvu102");
        if (!$con)
        {
            die('Could not connect: ' . mysql_error());
        }

        mysql_select_db("languagelearning", $con);

        $result = mysql_query("SELECT * FROM course");
        return $result;
    }
    
    
       
   public function GetListStatusByIDUser($id){
       $con = mysql_connect("localhost","phuongvu102","phuongvu102");
        if (!$con)
        {
            die('Could not connect: ' . mysql_error());
        }

        mysql_select_db("languagelearning", $con);

        $result = mysql_query("SELECT * FROM status WHERE ID_User=$id");
        return $result;
   }

   
   
   public function GetListWeek(){
       $con = mysql_connect("localhost","phuongvu102","phuongvu102");
        if (!$con)
        {
            die('Could not connect: ' . mysql_error());
        }

        mysql_select_db("languagelearning", $con);

        $result = mysql_query("SELECT * FROM week");
        return $result;
   }
   
   public function GetListLesson(){
       $con = mysql_connect("localhost","phuongvu102","phuongvu102");
        if (!$con)
        {
            die('Could not connect: ' . mysql_error());
        }

        mysql_select_db("languagelearning", $con);

        $result = mysql_query("SELECT * FROM lesson");
        return $result;
   }
}
?>
